package com.coolbi.onsupai.core.biz.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.coolbi.onsupai.core.biz.FranchiserFundDeclareBiz;
import com.coolbi.onsupai.core.dao.FranchiserFundDeclareDao;
import com.coolbi.onsupai.core.entity.FranchiserFundDeclare;
import com.coolbi.onsupai.core.exception.ServiceException;

public class FranchiserFundDeclareBizImpl implements FranchiserFundDeclareBiz{
	@Autowired
	private FranchiserFundDeclareDao franchiserFundDeclareDao;
	public void setAccountFundDeclareDao(FranchiserFundDeclareDao franchiserFundDeclareDao) {
		this.franchiserFundDeclareDao = franchiserFundDeclareDao;
	}
	@Override
	public FranchiserFundDeclare save(FranchiserFundDeclare obj) {
		try {
			franchiserFundDeclareDao.save(obj);
		} catch (Exception e) {
			throw new ServiceException("店面资金流动信息插入错误！",e);
		}
		return obj;
	}
	@Override
	public void delete(long id) {
		try {
			franchiserFundDeclareDao.delete(id);
		} catch (Exception e) {
			throw new ServiceException("店面资金流动信息删除错误！",e);
		}
		
	}
	@Override
	public void update(FranchiserFundDeclare obj) {
		try {
			franchiserFundDeclareDao.update(obj);
		} catch (Exception e) {
			throw new ServiceException("店面资金流动信息更新错误！",e);
		}
		
	}
	@Override
	public FranchiserFundDeclare get(long id) {
		
		return franchiserFundDeclareDao.get(id);
	}
	@Override
	public List<FranchiserFundDeclare> list() {
		return franchiserFundDeclareDao.list();
	}
	@Override
	public List<FranchiserFundDeclare> listByPage(int offset, int limit) {
		return franchiserFundDeclareDao.listByPage(offset, limit);
	}
	@Override
	public List<FranchiserFundDeclare> find(Map<String, Object> parameter) {
		return franchiserFundDeclareDao.find(parameter);
	}
	@Override
	public List<FranchiserFundDeclare> findByPage(Map<String, Object> parameter,
			int offset, int limit) {
		return franchiserFundDeclareDao.findByPage(parameter, offset, limit);
	}
	@Override
	public List<FranchiserFundDeclare> search(Map<String, Object> parameter,
			int offset, int limit) {
		return franchiserFundDeclareDao.search(parameter, offset, limit);
	}
	@Override
	public int count() {
		return franchiserFundDeclareDao.count();
	}
	@Override
	public int countByKeyWord(Map<String, Object> parameter) {
		return franchiserFundDeclareDao.countByKeyWord(parameter);
	}
	@Override
	public int count(Map<String, Object> parameter) {
		return franchiserFundDeclareDao.count(parameter);
	}



}
